//
// Created by denglibin on 2021/4/10 0010.
//

#ifndef SDL_DEMO_GAME_H
#define SDL_DEMO_GAME_H
#include "window.h"
#include "bg.h"
#include "spirit.h"
typedef struct game{
    GameWindow * gameWindow; //游戏窗口
    Background  *bg; //背景
    Spirit * spirit;
} Game;

/**
 * 创建游戏对象
 * @return
 */
Game * GM_createGame(const char* gameName);


/**
 * 绘制
 * @param game
 */
void GM_paint(Game* game);

/**
 * 事件循环
 * @param game
 */
void GM_eventLoop(Game* game);

/**
 * 开始游戏
 * @param game
 */
void GM_startGame(Game* game);

/**
 * 释放游戏资源
 */
void GM_freeGame(Game * game);
#endif //SDL_DEMO_GAME_H
